package com.fujica.db_operation.contrller;

import com.fujica.db_operation.entity.Student;
import com.fujica.db_operation.request.StudentReq;
import com.fujica.db_operation.server.IStudentService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @ClassName StudentController
 * @Description TODO
 * @Author admin
 * @Date 2020/6/18 16:55
 * @Version 1.0
 **/

@RestController
@RequestMapping("/student/info")
@Slf4j
public class StudentController {

    @Autowired
    private IStudentService iStudentService;

    @GetMapping
    @ResponseBody
    public List<Student> list(StudentReq req) {
        log.info("enter student list:{}", req);
        return iStudentService.list(req);
    }
}
